package com.example.controller;

import com.example.po.SysSms;
import com.example.service.SysSmsService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class SysSmsController {

    @Resource
    private SysSmsService sysSmsService;

    @RequestMapping(value = "applySms")
    public SysSms applySms() {
        return sysSmsService.applySms();
    }

    @RequestMapping(value = "sendSms")
    public boolean sendSms(@RequestParam Long id) {
        return sysSmsService.sendSms(id);
    }

    @RequestMapping(value = "failSms")
    public boolean failSms(@RequestParam Long id) {
        return sysSmsService.failSms(id);
    }

    @RequestMapping(value = "commitSms")
    public boolean commitSms(@RequestParam Long id) {
        return sysSmsService.commitSms(id);
    }

}
